import request from '@/config/axios'

export interface SessionRecordVO {
  id: number
  no: string
  recordId: string
  founder: string
  participants: string
  status: byte
}

// 查询相亲会话记录列表
export const getSessionRecordPage = async (params) => {
  return await request.get({ url: `/blind/session-record/page`, params })
}

// 查询相亲会话记录详情
export const getSessionRecord = async (id: number) => {
  return await request.get({ url: `/blind/session-record/get?id=` + id })
}

// 新增相亲会话记录
export const createSessionRecord = async (data: SessionRecordVO) => {
  return await request.post({ url: `/blind/session-record/create`, data })
}

// 修改相亲会话记录
export const updateSessionRecord = async (data: SessionRecordVO) => {
  return await request.put({ url: `/blind/session-record/update`, data })
}

// 删除相亲会话记录
export const deleteSessionRecord = async (id: number) => {
  return await request.delete({ url: `/blind/session-record/delete?id=` + id })
}

// 导出相亲会话记录 Excel
export const exportSessionRecord = async (params) => {
  return await request.download({ url: `/blind/session-record/export-excel`, params })
}

// 查询聊天记录列表
export const getListByRecordId = async (params) => {
  return await request.get({ url: `/blind/session-record/listByRecordId`, params })
}
// 查询聊天记录列表
export const getMessagePage = async (params) => {
  return await request.get({ url: `/blind/session-record/messagePage`, params })
}
